﻿<%@ Page Title="首页" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="HomeIndex.aspx.cs" Inherits="RegexLib.Web.Views.Home.HomeIndex" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<% var lasted = (RegexInfo[])ViewData.Model; %>
<div class="ap-blue">
<p>这里是大家帮助大家的<strong>[.NET正则表达式库]</strong>。</p>
<p>希望您能在这里找到您所需的正则表达式，或者能对您的问题得到满意的答复。然而，这里的所有资源都来自于广大的开发者朋友，是他们帮助了您。</p>
<p>希望您同样具有这样的分享精神，把您掌握的、优秀的正则表达式<a href="/Regex/Add/"><strong>添加到[.NET正则表达式库]</strong></a>。</p>
</div>
<div class="box">
	<div class="bt">最新添加</div>
	<div class="bc">
<% for (int i = 0; i < lasted.Length; i++) %>
<% { %>
		<p class="sm-des">[<%= lasted[i].AddedTime.ToString("yyyy-MM-dd HH:mm:ss") %>]
		<a href='<%= RxUrl.GetViewRegexUrl(lasted[i].AccessKey) %>'><%= HttpUtility.HtmlEncode(lasted[i].Title.LimitLength(80)) %></a></p>
		<p class="sm-des"><%= HttpUtility.HtmlEncode(lasted[i].Description.LimitLength(200)) %></p>
	<% if (i < lasted.Length - 1) %>
	<% { %>
		<% if(i == 10 || i == 20) %>
		<% { %>
			<hr />
			<div class="ad-c"><%= RxAdsUtility.GetAdsCode("inpage") %></div>
		<% } %>
		<hr />
	<% } %>
<% } %>
		<p class="cmd-r"><a href="/Regex/All/">全部</a></p>
	</div>
</div>
</asp:Content>
